﻿Namespace Compiler.Semantic
    Public Class ArrayTypeBinding
        Inherits TypeReference

        Private m_elementType As TypeReference

        Public Overridable Property ElementType() As TypeReference
            Get
                Return m_elementType
            End Get
            Set(ByVal value As TypeReference)
                m_elementType = value
            End Set
        End Property

        Private m_rank As Integer = 1
        Public Property Rank() As Integer
            Get
                Return m_rank
            End Get
            Set(ByVal value As Integer)
                m_rank = value
            End Set
        End Property

        Public Overrides Function GetReflectionType() As System.Type
            Return m_elementType.GetReflectionType().MakeArrayType(m_rank)
        End Function
    End Class
End Namespace

